{extends file="index.tpl"}
{block name="page-content"}

<div class="row-fluid">
    <div class="span12">
        <div class="block">
            <div class="head dblue">
                <div class="icon"><span class="ico-layout-9"></span></div>
                <h2>Danh Sách Device</h2>
                <ul class="buttons">
                    <li><a href="#" onClick="source('table_sort_pagination'); return false;">
                        <div class="icon"><span class="ico-info"></span></div>
                    </a></li>
                </ul>
            </div>
            <div class="data-fluid">
                <table class="table lcnp" id="listGame" cellpadding="0" cellspacing="0" width="100%">
                    <thead>
                        <tr>
                            <th width="10%"><input type="checkbox" class="checkall" /></th>
                            <th width="10%">ID</th>
                            <th width="70%">Device Name</th>
                            <th width="10%" class="TAC">Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                   	{if isset($deviceArr)}
                    {foreach from=$deviceArr item=device}
                        <tr>
                            <td><input type="checkbox" name="order[]" value="528" /></td>
                            <td>{$device.id}</td>
                            <td>{$device.device_name}</td>
                            <td>
                                <a href="{$WEB_BASE_URL}/index.php?controller=device&action=update&id={$device.id}" class="button green">
                                    <div class="icon"><span class="ico-pencil"></span></div>
                                </a>
                                <a href="{$WEB_BASE_URL}/index.php?controller=device&action=delete&id={$device.id}" class="button red" onclick="return confirm('Bạn có muốn xóa tiếp không?')">
                                    <div class="icon"><span class="ico-remove"></span></div>
                                </a>
                            </td>
                        </tr>
                    {/foreach}
                    {/if}
                    </tbody>
                </table>
                <div class="pagination pagination-centered">
                       {if isset($pageFirst) && isset($pagePrev) && isset($pageList) && isset($pageNext) && isset($pageLast)}
	                	<ul>
	                		<li class="disabled">{$pageFirst}</li>
	                		<li class="active">{$pagePrev}</li>
	                		<li>{$pageList}</li>
	                		<li>{$pageNext}</li>
	                		<li>{$pageLast}</li>
	                    </ul>
	                    {/if}
                    </div>
            </div>
        </div>
    </div>
</div>

{/block}
